package com.ice.work.moment.crawler.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.honeybee.cloud.framework.base.exception.business.BaseBizException;
import com.honeybee.cloud.framework.common.page.Page;
import com.ice.work.moment.facade.crawler.dto.PositionTypeDTO;
import com.ice.work.moment.facade.crawler.model.PositionType;

import java.util.Collection;

/**
 * @Description 持仓类型信息
 * @Author DELL
 * @Create 2019-05-05
 * @Since 1.0.0
 */
@SuppressWarnings("unused")
public interface IlPositionTypeService {
    /**
     * 保存信息
     *
     * @param types
     * @return
     * @throws BaseBizException
     */
    Boolean save(Collection<PositionType> types) throws BaseBizException;

    /**
     * 保存信息
     *
     * @param type
     * @return
     * @throws BaseBizException
     */
    Boolean save(PositionType type) throws BaseBizException;

    /**
     * 查询
     *
     * @param value
     * @return
     * @throws BaseBizException
     */
    PositionTypeDTO findByValue(String value) throws BaseBizException;

    /**
     * 保存信息
     *
     * @param type
     * @return
     * @throws BaseBizException
     */
    Boolean saveOrUpdate(PositionType type) throws BaseBizException;


    /**
     * 分页查询
     *
     * @param page
     * @return
     * @throws BaseBizException
     */
    Page<PositionTypeDTO> page(IPage<PositionType> page) throws BaseBizException;

}
